﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MShop.Core.Domain.Product>>" %>

<% MShop.Web.Controllers.ControllerBase cb = this.ViewContext.Controller as MShop.Web.Controllers.ControllerBase; %>
<style type="text/css">
    .productad
    {
        text-align: left;
    }
    .productad ul
    {
        margin: 3px;
        padding: 10px;
    }
    .productad ul li
    {
        float: left;
        padding: 5px;
        list-style: none;
        width: 210px;
        height: 190px;
        overflow: hidden;
        border:1px solid #dadada;
    }
    .productad ul li a.thumb img
    {
        width: 120px;
        height: 120px;
        padding: 3px;
        margin:1px;
        border:1px solid #dadada;
    }
    
</style>
<div class="productad" style="font-size:12px;">
    <ul>
        <% foreach (var item in Model)
           { %>
        <li><a href='<%=cb.ShopContext.Settings.WebSiteUrl %>/product/item/<%=item.Id %>'
            target="_blank">
            <img class="thumb" style="width:120px;height:120px;" src='<%=string.Concat(cb.ShopContext.Settings.WebSiteUrl,item.ThumbImageUrl) %>' /></a>
            <br />
            <%=item.ProductName %>
            <% if(Request.Form["region"]!=null){ %>
               <br />产地：<%=cb.DictDao.GetKeyName(1,Convert.ToInt32(item.Region)) %>
            <%} %>
             <% if(Request.Form["price"]!=null){ %>
               <br />价格：<%=item.ShopPrice %>
            <%} %>
        </li>
        <%} %>
    </ul>
</div>
 